package com.deer.wms.ASN.manage.dao;

import com.deer.wms.ASN.manage.model.in.AcceptRecord;
import com.deer.wms.ASN.manage.model.in.AcceptRecordCriteria;
import com.deer.wms.ASN.manage.model.in.AcceptRecordExcel;
import com.deer.wms.ASN.manage.model.qc.QcRecordCriteria;
import com.deer.wms.ASN.manage.model.qc.QcRecordDto;
import com.deer.wms.project.root.mapper.SuperMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * @author guo
 */
public interface AcceptRecordMapper extends SuperMapper<AcceptRecord> {

    /**
     * 根据条件查询收货单
     * @param criteria 查询条件
     * @return List<AcceptRecord>
     */
    List<AcceptRecord> findList(AcceptRecordCriteria criteria);

    List<AcceptRecord> findCanTongbu();

    List<AcceptRecord> findDayList(AcceptRecordCriteria criteria);

    Integer getNextBoxCode();

    void updateQcState(String acceptRecordCode,int qcState);

    void updateAllQcState(String asnBillNo, int qcState);

    List<AcceptRecord> findBillNo(String toBoxCode);

    Map<String,Object> findByCode(String code);

    long findCount(AcceptRecordCriteria criteria);

    /**
     * 合格未入库
     * @param criteria
     * @return
     */
    List<AcceptRecordExcel> notPut(AcceptRecordCriteria criteria);

    List<AcceptRecordExcel> findLast(@Param("set") Set<String> itemCodes);
}
